//
//  UIs_APTagsView_DemoVC.swift
//  APSwift
//
//  Created by jianbo.pei on 2022/9/14.
//

import UIKit

class UIs_TagsModel: NSObject, APTagsModelProtocol {
    var tagNameWidth: CGFloat?
    var tagItemWidth: CGFloat?
    
    var name: String? {
        didSet {
            
        }
    }
    
    var id: String?
    
}

class UIs_APTagsView_DemoVC: UIViewController {

    private var tagsView: APTagsView!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        view.backgroundColor = .white
        // Do any additional setup after loading the view.
        tagsView = APTagsView(frame: CGRect(x: 10, y: 160, width: 300, height: 300))
        view.addSubview(tagsView)
        configTagModels()
    }
    

    private func configTagModels() {
        var tagMs: [APTagsModelProtocol] = []
        for idx in 0..<20 {
            let tagM = UIs_TagsModel()
            tagM.name = "中国 - 00\(idx)"
            tagMs.append(tagM)
        }
        tagsView.tagModels = tagMs
    }
}
